<template>
    <div class="">
        <el-bread></el-bread>
        <!-- 按钮 -->
        <el-button class="btnInfo" type="primary" size="small" plain @click="adddialog">添加</el-button>
        <v-list @edit="edit"></v-list>
        <v-dialog :isShow="isShow" :isAdd="isAdd" ref="diaInfo" @cancel="cancel"></v-dialog>
    </div>
</template>
<script>
import vDialog from './dialog.vue'
import vList from './list.vue'
export default {
    data() {
        return {
            isShow: false,
            isAdd: true
        }
    },
    components: {
        vDialog,
        vList
    },
    methods: {
        adddialog() {
            this.isShow = true
            this.isAdd = true
        },
        cancel(e){
            this.isShow=e
        },
        edit(e){
            this.isAdd=false
            this.isShow=true
            this.$refs.diaInfo.lookup(e)
        }
    }

}
</script>
<style scoped>
.btnInfo {
    margin: 10px 5px;
}
</style>